<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        let objs = {
            name: '李四',
            age: 22,
            sex: '男',
            zhuzhi: '北京'
        }

        let tasealimo = {
            chi: '麻辣烫',
            wan: '天安门',
            kan: '熊出没',
            zhu: '酒店'
        }


        let obj = {}
        // 链接原型 obj ==> tasealimo Object
        Object.setPrototypeOf(objs, tasealimo)
        console.log(objs);
        console.log(objs.name + '喜欢吃' + objs.chi);


        console.log('-----------');

        // 可枚举类型
        Object.defineProperty(obj, 'a', {
            value: 1,
            writable: true,
            enumerable: true,
            configurable: true,
        })
        // 不可枚举类型
        Object.defineProperty(obj, 'b', {
            value: 2,
            writable: true,
            enumerable: false,
            configurable: true,
        })
        console.log(Object.keys(obj)); //a 


    </script>
</body>

</html>